//
//  BlogCellPresenter.h
//  CharlesMVX
//
//  Created by Charles on 2020/3/11.
//  Copyright © 2020 Charles. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Blog.h"
#import "UserAPIManager.h"

NS_ASSUME_NONNULL_BEGIN

@class BlogCellPresenter;
@protocol BlogCellPresenterCallBack <NSObject>

@optional
- (void)blogPresenterDidUpdateLikeState:(BlogCellPresenter *)presenter;
- (void)blogPresenterDidUpdateShareState:(BlogCellPresenter *)presenter;

@end

@interface BlogCellPresenter : NSObject

@property (nonatomic, weak) id<BlogCellPresenterCallBack> callBack;
+ (instancetype)presenterWithBlog:(Blog *)blog;

- (Blog *)blog;

- (BOOL)isLiked;
- (NSString *)blogTitleText;
- (NSString *)blogSummaryText;
- (NSString *)blogLikeCountText;
- (NSString *)blogShareCountText;

- (void)likeBlogWithCompletionHandler:(NetworkCompletionHandler)completionHandler;
- (void)shareBlogWithCompletionHandler:(NetworkCompletionHandler)completionHandler;

@end

NS_ASSUME_NONNULL_END
